<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>计算属性-methods和computed</title>
  <script src="vue.js"></script>
</head>
<body>
   <script>
      let vm = new Vue({
         methods: {
            getTimeA: () => Math.random()
         },
         computed: {
            getTimeB: () => Math.random()
         }
      });
      console.log(vm.getTimeA()); 
      console.log(vm.getTimeA()); 
      console.log(vm.getTimeA()); 
      console.log("-----------------");
      console.log(vm.getTimeB); 
      console.log(vm.getTimeB); 
      console.log(vm.getTimeB); 
   </script>
</body>
</html>
